Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripting: only try loading from ROMFS if scripts exist #26312

Merged
merged 3 commits into from Feb 27, 2024

Conversation

IamPete1
Copy link
Member

#26225 means that ROMFS will fail to open directories that don't exist. This results in a failed to open directory warning in ROMFS:

image

We can tell at compile time if there are any scripts we could try to load, so we can compile out trying to load from ROMFS.

@IamPete1
Copy link
Member Author

saves a tiny bit of flash with no scripts added:

Binary Name      Text [B]        Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  --------------  -----------  -------------  ----------------------------  -------------------------
ardurover        -36 (-0.0022%)  0 (0.0000%)  4 (+0.0015%)   -36 (-0.0022%)                                   336548
blimp            -36 (-0.0027%)  0 (0.0000%)  -4 (-0.0015%)  -36 (-0.0027%)                                   620992
arducopter       -36 (-0.0020%)  0 (0.0000%)  4 (+0.0015%)   -36 (-0.0020%)                                   192356
arduplane        -36 (-0.0020%)  0 (0.0000%)  4 (+0.0015%)   -36 (-0.0020%)                                   200040
ardusub          -36 (-0.0023%)  0 (0.0000%)  -4 (-0.0015%)  -36 (-0.0023%)                                   397920
antennatracker   -36 (-0.0027%)  0 (0.0000%)  4 (+0.0015%)   -36 (-0.0027%)                                   643844
arducopter-heli  -36 (-0.0020%)  0 (0.0000%)  -4 (-0.0015%)  -36 (-0.0020%)                                   186164

@rmackay9
Copy link
Contributor

I've tested and this resolves the issue. Thanks!

@tridge tridge merged commit c7d543f into ArduPilot:master Feb 27, 2024
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants